<?PHP
require_once("./top-config.php");
?>
<?PHP
$error = 0;
if(isset($_POST['Search']))
{
	if($fgmembersite->Quick_Search_Form_Handler())
	{
//		$fgmembersite->RedirectToURL($fgmembersite->GetSelfScript());   
	}
	else
	{
		$error = 1;
	}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?PHP $fgmembersite->GetString('Search Group','Tìm kiếm')?></title>
<?PHP
require_once("./pre-config.php");
?>
</head> 
<body>
<?PHP
require_once("./main-nav.php");
?>
<div class="container">
    <div class="row">
        <div class="col-md-12">
			<form id='join-group' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
				<div id="notice-board">
					<?PHP $fgmembersite->GetErrorMessage()?>				
				</div>
				<div class="form-group">
					<h4 class="text-primary"><?PHP $fgmembersite->GetString('Search Group:','Tìm kiếm nhóm:')?></h4>
					<label for="inputSearch-Key"><?PHP $fgmembersite->GetString('Search key(Nothing means all):','Từ khóa(Rỗng có nghĩa là tất cả):')?></label>
					<input type="text" class="form-control" name="search_key" id="search_key" value='<?php echo $fgmembersite->SafeDisplay('search_key'); ?>' maxlength="32"/>
					<label for="inputstart_time"><?PHP $fgmembersite->GetString('Created time From','Thời gian thành lập từ')?> <small>(YYYY-MM-DD HH:MM:SS)*</small>:</label>
					<input type="text" class="form-control" name="start_time" id="start_time" value='<?php echo $fgmembersite->SafeDisplay('start_time'); ?>'/>
					<label for="inputend_time"><?PHP $fgmembersite->GetString('To','Tới')?> <small>(YYYY-MM-DD HH:MM:SS)*</small>:</label>
					<input type="text" class="form-control" name="end_time" id="end_time" value='<?php echo $fgmembersite->SafeDisplay('end_time'); ?>'/>
					<?PHP
					if(isset($_POST['Search']))
					{
						if($error == 0)
						{
							$fgmembersite->Quick_Register_Search_Owners_Of_Groups_Handler('control-group.php');
						}
						else
						{
							$error == 0;
						}
					}
					?>

				</div>
				<button type="submit"  name='Search' class="btn btn-success center-block"><?PHP $fgmembersite->GetString('Search','Tìm kiếm')?></button>
			</form>
		</div>
    </div>
</div>
<?PHP
require_once("./footer.php");
?>
</body>
</html>                                		